package com.nuodui.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 用户表
 * </p>
 *
 * 该类不能用lombok   的 @Data生成  getter 和 setter方法  因为属性第一个字母消息第二个字母大写的原因
 */
@TableName("usertable")
@ApiModel(value="Usertable对象", description="用户表")
public class UserTable implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增  用户编号")
    @TableId(value = "uCode", type = IdType.AUTO)
    private Integer uCode;

    @ApiModelProperty(value = "名称")
    @NotNull(message = "名称不能为空")
    @TableField(value = "uName")
    private String uName;

    @ApiModelProperty(value = "密码")
    @NotNull(message = "密码不能为空")
    @TableField(value = "uPwd")
    private String uPwd;


    @ApiModelProperty(value = "确认密码")
    @NotNull(message = "确认密码不能为空")
    @TableField(exist = false)
    private String uPwd2;

    @ApiModelProperty(value = "类型   0：普通； 1：管理员")
    @NotNull(message = "类型不能为空")
    @TableField(value = "uType")
    private Integer uType;

    @ApiModelProperty(value = "备注")
    @NotNull(message = "备注不能为空")
    @TableField(value = "uMemo")
    private String uMemo;

    public UserTable() {

    }
    public UserTable(Integer uCode, String uName, String uPwd, String uPwd2, Integer uType, String uMemo) {
        this.uCode = uCode;
        this.uName = uName;
        this.uPwd = uPwd;
        this.uPwd2 = uPwd2;
        this.uType = uType;
        this.uMemo = uMemo;
    }

    public Integer getuCode() {
        return uCode;
    }

    public void setuCode(Integer uCode) {
        this.uCode = uCode;
    }

    public String getuName() {
        return uName;
    }

    public void setuName(String uName) {
        this.uName = uName;
    }

    public String getuPwd() {
        return uPwd;
    }

    public void setuPwd(String uPwd) {
        this.uPwd = uPwd;
    }

    public String getuPwd2() {
        return uPwd2;
    }

    public void setuPwd2(String uPwd2) {
        this.uPwd2 = uPwd2;
    }

    public Integer getuType() {
        return uType;
    }

    public void setuType(Integer uType) {
        this.uType = uType;
    }

    public String getuMemo() {
        return uMemo;
    }

    public void setuMemo(String uMemo) {
        this.uMemo = uMemo;
    }
}
